package com.antdesignbackend.backend.service.impl;

import com.antdesignbackend.backend.entity.HarmlessRecord;
import com.antdesignbackend.backend.entity.entityVo.HarmlessRecordVo;
import com.antdesignbackend.backend.mapper.HarmlessRecordMapper;
import com.antdesignbackend.backend.service.HarmlessRecordService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HarmlessRecordServiceImpl extends ServiceImpl<HarmlessRecordMapper,HarmlessRecord> implements HarmlessRecordService {
    @Autowired
    HarmlessRecordMapper harmlessRecordMapper;
    @Override
    public List<HarmlessRecordVo> search(@Param(Constants.WRAPPER) QueryWrapper<HarmlessRecordVo> harmlessRecordVoQueryWrapper, Page<HarmlessRecordVo> harmlessRecordVoPage){
        return harmlessRecordMapper.search(harmlessRecordVoQueryWrapper,harmlessRecordVoPage);
    };
    public Integer count(@Param(Constants.WRAPPER) QueryWrapper<HarmlessRecordVo> harmlessRecordVoQueryWrapper){
        return harmlessRecordMapper.count(harmlessRecordVoQueryWrapper);
    };
}
